package com.service.pay.diamond.dao;

import com.service.pay.diamond.entity.UnifiedOrderEntity;
import com.service.pay.diamond.interpreter.UnifiedOrderInterpreter;
import com.service.pay.diamond.model.UnifiedOrderModel;
import com.service.pay.diamond.repository.UnifiedOrderRepository;
import com.tool.base.base.BaseDao;
import org.springframework.stereotype.Component;

@Component
public class UnifiedOrderDao extends BaseDao<UnifiedOrderEntity, UnifiedOrderModel, UnifiedOrderRepository, UnifiedOrderInterpreter> {
    public UnifiedOrderModel getByOrderNo(String orderNo) {
        return mapper.entityToModel(repository.getByOrderNo(orderNo));
    }

    public UnifiedOrderModel getByPrepayId(String prepareId) {
        return mapper.entityToModel(repository.getByPrepayId(prepareId));
    }
}
